if type nmcli &>/dev/null; then
	conn_name=$(nmcli c s --active | grep ethernet | awk -F"  " '{print $1}')
	sudo nmcli con modify "$conn_name" ipv4.dns-options "single-request"
	sudo nmcli con mod "$conn_name" ipv4.ignore-auto-dns yes
	# sudo nmcli con mod "$conn_name" ipv4.dns "223.5.5.5,223.6.6.6"
	sudo systemctl restart NetworkManager
else
	version=$(grep 'VERSION_ID=' /etc/os-release | cut -d= -f2 | tr -d '"')
	if [[ $version == 12 ]]; then
		echo 'options single-request' | tee -a /etc/resolv.conf >/dev/null
		echo 'echo "options single-request" >> /etc/resolv.conf' | tee /etc/dhcp/dhclient-exit-hooks.d/single-request >/dev/null
	fi
	if [[ $version == 13 ]]; then
		echo 'options single-request' | tee -a /etc/resolv.conf >/dev/null
		echo 'options single-request' | tee /etc/resolv.conf.tail >/dev/null
	fi
fi

sleep 3
# systemctl restart networking.service

# bash -c "$(wget https://gitee.com/hevey88/install_script/raw/main/dns_single_request.sh -O -)"
